package cn.jtfadmin.codegen;

import cn.jtfadmin.base.lang.config.module.DefaultModuleInfoDTO;
import cn.jtfadmin.base.lang.config.module.ModuleInfo;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

/**
 * 自动配置类
 * @author jtf
 * @since 0.0.1
 */
@Configuration
@ComponentScan(basePackageClasses = CodeGenAutoConfigure.class,
        excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION ,classes = SpringBootApplication.class)})
@EntityScan("cn.jtfadmin.codegen")
@EnableJpaRepositories
public class CodeGenAutoConfigure {
    @Bean
    public ModuleInfo codeGenModuleInfo(){
        return new DefaultModuleInfoDTO("codegen", "代码生成", "代码生成", getClass().getPackage().getName());
    }


}
